package com.andnnl.filter;

import java.text.Normalizer;

/**
 * Created by chenss on 2025/6/30.
 */
public class ConvTest {
    public static void main(String[] args) {

        String processed = "顶替１２３４５６阿斯蒂芬７８９０阿斯蒂芬";
        processed = Normalizer.normalize(processed, Normalizer.Form.NFKC);
        System.out.println(processed); // 输出: 1234567890


//        String processed = "１２３４５６７８９０";
        // 优化：直接匹配全角数字范围 [\uFF10-\uFF19]
//        processed = processed.replaceAll("[\uFF10-\uFF19]", match ->
//                String.valueOf((char)(match.charAt(0) - 0xFEE0))
//        );
//        System.out.println(processed); // 输出: 1234567890
    }
}
